package com.fd.dx.web.controllers;

import com.fd.dx.service.StatService;
import com.fd.dx.web.domain.GeneCell;
import com.fd.dx.web.domain.PieCell;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by lenovo on 2018/2/27.
 */
@Controller
@RequestMapping("/stat")
public class StatController {
    @Autowired
    private StatService statService;
    /**
     * 返回每一代有多少人
     * @return
     */
    @RequestMapping("/getGene")
    @ResponseBody
    public List<GeneCell> getGene() {
        return statService.getGene();
    }
    @RequestMapping("/getPieCell")
    @ResponseBody
    public List<PieCell> getPieCell() {
        return statService.getPieCell();
    }
}
